{% extends 'maintemplate.html' %}

{% block contents %}
{% load hakaze_filters %}
<h1>{{ tsettings.site_name }}  | {{ tsettings.site_index_title }} </h1>
<br/>
<b><a href="{% url hakaze.forums.views.feed_all_latestthreads "html" %}">All Latest Threads</a></b> | <a href="{% url hakaze.forums.views.feed_all_latestthreads "atom1" %}">ATOM Feed</a><br/>
<b><a href="{% url hakaze.forums.views.feed_all_latestposts "html" %}">All Latest Posts</a></b> | <a href="{% url hakaze.forums.views.feed_all_latestposts "atom1" %}">ATOM Feed</a><br/>
{% if categories %}
    <br/>
    <br/>
    {% for c in categories %}
        <h2>{{ c.name }}</h2>
        {% for s in c.channel_set.all %}
          <div class="lightborder">
           <span style="font-size:130%" class="floatleft">
           <b>Channel : <a href="{% url hakaze.forums.views.channelview s.codename %}">{{ s.name }}</a></b>
           </span>
           <span class="floatright">
               <a href="javascript:toggleLayer('latestthread{{ forloop.parentloop.counter }}{{ forloop.counter }}');"> Latest Threads  &#9660;</a>
           </span>
           <div class="clear"></div>
             <br/>
         </div>
           <div id="latestthread{{ forloop.parentloop.counter }}{{ forloop.counter }}" class="hidden">
             <br/>
              <b><a href="{% url hakaze.forums.views.channelview s.codename %}">&gt;&gt; Go to Channel</a></b><br/><br/>
              <b><a href="{% url hakaze.forums.views.feed_channel_latestthreads s.codename,"html" %}">Latest Threads from <i>{{ s.name }}</i></a></b> |
              <a href="{% url hakaze.forums.views.feed_channel_latestthreads s.codename,"atom1" %}">ATOM Feed</a><br/>
              <b><a href="{% url hakaze.forums.views.feed_channel_latestposts s.codename,"html" %}">Latest Posts from <i>{{ s.name }}</i></a></b> |
              <a href="{% url hakaze.forums.views.feed_channel_latestposts s.codename,"atom1" %}">ATOM Feed</a><br/>
           <blockquote>
           {% for t in s.get_newthreadposts|slice:":7" %}
            <span class="floatleft">
                <b>Thread : </b> <a href="{% url hakaze.forums.views.threadview s.codename,t.get_idinchannel %}"><b>{{ t.title }} </b></a>
            </span>
         <span class="floatright">
            <a href="javascript:toggleLayer('latestpost{{ forloop.parentloop.parentloop.counter }}{{ forloop.parentloop.counter }}{{ forloop.counter }}');">Latest Posts &#9660;</a>
         </span>
          <div class="clear"></div>
        <div id="latestpost{{ forloop.parentloop.parentloop.counter }}{{ forloop.parentloop.counter }}{{ forloop.counter }}" class="hidden">
              <br/>
              <a href="{% url hakaze.forums.views.threadview s.codename,t.get_idinchannel %}">&gt;&gt; Go to Thread</a><br/><br/>
              <a href="{% url hakaze.forums.views.feed_thread_latestposts s.codename,t.get_idinchannel,"html" %}">Latest Posts from <i>{{ t.title }}</i></a> | 
              <a href="{% url hakaze.forums.views.feed_thread_latestposts s.codename,t.get_idinchannel,"atom1" %}">ATOM Feed</a>
              <blockquote>
              <ul> 
              {% for p in  t.getlatestposts %}
                     <li><b><a href="{% url hakaze.forums.views.postview s.codename,t.get_idinchannel,p.get_idinthread %}">&gt;&gt; Post</a></b> {{ p.datetime }} - {{ p.get_name }}
                     {% if p.tripcode %} ID:{{ p.tripcode }} {% endif %}</li>
              {% endfor %}
              </ul>
              </blockquote>
             </div>
           {% endfor %}
           </blockquote>
           </div>
           <br/>
        {% endfor %}
       <br/>
    {% endfor %}
    <br/>
{% endif %}
<div style="clear:both">&nbsp;</div>
{% endblock contents %}



